package com.ruoyi.project.agvQuene.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.agvQuene.mapper.AgvExecutionMapper;
import com.ruoyi.project.agvQuene.domain.AgvExecution;
import com.ruoyi.project.agvQuene.service.IAgvExecutionService;
import com.ruoyi.common.core.text.Convert;

/**
 * AGV/CTU执行队列Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Service
public class AgvExecutionServiceImpl implements IAgvExecutionService 
{
    @Autowired
    private AgvExecutionMapper agvExecutionMapper;

    /**
     * 查询AGV/CTU执行队列
     * 
     * @param reqCode AGV/CTU执行队列主键
     * @return AGV/CTU执行队列
     */
    @Override
    public AgvExecution selectAgvExecutionByReqCode(String reqCode)
    {
        return agvExecutionMapper.selectAgvExecutionByReqCode(reqCode);
    }

    /**
     * 查询AGV/CTU执行队列列表
     * 
     * @param agvExecution AGV/CTU执行队列
     * @return AGV/CTU执行队列
     */
    @Override
    public List<AgvExecution> selectAgvExecutionList(AgvExecution agvExecution)
    {
        return agvExecutionMapper.selectAgvExecutionList(agvExecution);
    }

    /**
     * 新增AGV/CTU执行队列
     * 
     * @param agvExecution AGV/CTU执行队列
     * @return 结果
     */
    @Override
    public int insertAgvExecution(AgvExecution agvExecution)
    {
        return agvExecutionMapper.insertAgvExecution(agvExecution);
    }

    /**
     * 修改AGV/CTU执行队列
     * 
     * @param agvExecution AGV/CTU执行队列
     * @return 结果
     */
    @Override
    public int updateAgvExecution(AgvExecution agvExecution)
    {
        return agvExecutionMapper.updateAgvExecution(agvExecution);
    }

    /**
     * 批量删除AGV/CTU执行队列
     * 
     * @param reqCodes 需要删除的AGV/CTU执行队列主键
     * @return 结果
     */
    @Override
    public int deleteAgvExecutionByReqCodes(String reqCodes)
    {
        return agvExecutionMapper.deleteAgvExecutionByReqCodes(Convert.toStrArray(reqCodes));
    }

    /**
     * 删除AGV/CTU执行队列信息
     * 
     * @param reqCode AGV/CTU执行队列主键
     * @return 结果
     */
    @Override
    public int deleteAgvExecutionByReqCode(String reqCode)
    {
        return agvExecutionMapper.deleteAgvExecutionByReqCode(reqCode);
    }

    @Override
    public List<AgvExecution> selectAgvExecutionListFinish(AgvExecution agvExecution) {
        return agvExecutionMapper.selectAgvExecutionListFinish(agvExecution);
    }

    @Override
    public void updateReload(String s) {
         agvExecutionMapper.updateReload(s);
    }
}
